﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="quan_tri_weblink.ascx.cs" Inherits="Admin_Module_quan_tri_weblink" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadAjaxManager OnAjaxRequest="Ajax_Request" ID="RadAjaxManager1" runat="server" 
    DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
       <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grdContact" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="grdContact">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                <telerik:AjaxUpdatedControl ControlID="grdContact" />
                <telerik:AjaxUpdatedControl ControlID="lblMessage" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>

<telerik:RadScriptBlock runat="server" ID="script1">
    <script type="text/javascript" language="javascript">
        function Window_Close() {
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
        }
    </script>
</telerik:RadScriptBlock>

<telerik:RadWindowManager  ID="RadWindowManager1" runat="server" >
    <Windows>
        <telerik:RadWindow OnClientClose="Window_Close" VisibleStatusbar="false"  Width="800px" Height="600px" runat="server" ID="windows1"></telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

<asp:Label runat="server" ID="lblMessage"></asp:Label>
<fieldset style="width: 800px">
    <legend style="padding: 10px 20px 10px"><h3 style="color: #3333FF; font-size:large">QUẢN TRỊ WEBLINK</h3></legend>

    <table width="100%">
        <tr>
            <td style="width:80%"> <span class="title"></span></td>
            <td align="right"><a href="/Admin/Form/Weblink_Add.aspx" ><img src="/Image/add2.png" alt="Thêm mới quảng cáo" />Thêm Mới</a></td>
        </tr>
    </table>
<telerik:RadGrid runat="server" AllowFilteringByColumn="True" Skin="WebBlue" GridLines="Horizontal"   AllowSorting="true" ID="grdContact" AutoGenerateColumns="false"  >
    <MasterTableView NoDetailRecordsText="Không có dữ liệu">
        <Columns>
           <telerik:GridTemplateColumn AutoPostBackOnFilter="true" AllowFiltering="true" HeaderText="Tên Đối Tác" DataField="ContactName">                
                <ItemTemplate>
                    <a href="/Admin/Form/Weblink_Add.aspx?id=<%#DataBinder.Eval(Container.DataItem,"WeblinkID")%>">
                    <img width="150" height="150" src='<%# Eval("CompanyName")%>' /></a>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
           
           <telerik:GridBoundColumn DataField="Weblink" HeaderText="Đường dẫn" AllowFiltering="true"></telerik:GridBoundColumn>
           <telerik:GridBoundColumn DataField="ViewOrder" HeaderText="Thứ tự" AllowFiltering="true"></telerik:GridBoundColumn>
            <telerik:GridTemplateColumn AllowFiltering="false" HeaderText="Xóa" >
                <ItemStyle Width="20px" />
                <ItemTemplate>
                    <asp:LinkButton OnClientClick="return ConfirmDelete()" runat="server" ID="btnDelete" CausesValidation="false" CommandArgument='<%# Eval("WeblinkID") %>' OnClick="Weblink_Delete" >Delete</asp:LinkButton>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
</fieldset>
